###############################################################################
#                                                                      #
# RCBgh-60.zip: Groundhandling gauges                                  #
#                                                                      #
# For FSX (all versions), P3Dv2/3.* and P3Dv4.*                        #
#                                                                      #
#                        By Rob Barendregt            11 Nov 2017      #
#                                                     Release V6.0     #
########################################################################


PLEASE, READ THIS MANUAL CAREFULLY BEFORE INSTALLING & USING THESE GAUGES.

This archive contains a set of groundhandling gauges which you can add to the
panel of any aircraft in FSX/P3D:
- a Pushback gauge (2 variants)
- a Taxispeed gauge.
- a Brakes gauge.

For existing users of these gauges (Groundhandling V5) in FSX: please read Appendix-2 for changes.

Contents
===========
0.     VERY IMPORTANT MUST-READ REMARKS
1.     Introduction
2.     Installation
3.     Gauge operation
3.1    Pushback operation (old-style)
3.1.1  Pushback timer/counters, buttons and phases
3.1.2  Pushback Operation and Ground-Cockpit conversation
3.2    Pushback operation (free-control)
3.3    Taxispeed operation
3.3.1  Taxispeed indicators and dials
3.3.2  How the Taxispeed control works
3.4    The Brakes gauge
4.     Copyrights and Disclaimer
5.     Credits
6.     Closure
Appendix-1: Used Sound files, and how to change volume.
Appendix-2: When you used Groundhandling V5 before .....


**** VERY IMPORTANT 1 ****
To use this package fully, requires the Microsoft "Visual C++ 2015 Redistributable"
to be installed on your PC.
You can check this in Windows, under "Installed Programs".
It should contain the entries:
- Microsoft Visual C++ 2015 Redistributable (x86)
and
- Microsoft Visual C++ 2015 Redistributable (x64).

If not installed yet, you can download it here:
https://www.microsoft.com/en-us/download/details.aspx?id=48145
Works for WindowsXP-SP3 upto Windows10.
It's best to install both the .x86 and .x64 versions.
**************************

**** VERY IMPORTANT 2 ****
If you still use FSX-RTM, FSX-SP1 or FSX-SP2:
Taxispeed and Pushback will NOT WORK ON MOVING SURFACES !!!.
Reason: the groundspeed control in these gauges uses an FS variable introduced in FSX-Acceleration.
**************************

**** VERY IMPORTANT 3 ****
For taildragger aircraft (all FSX/P3D versions):
Taxispeed and Pushback will NOT WORK ON MOVING SURFACES !!!.
Reason: the groundspeed control in these gauges uses the FS variable for nosewheel rotation.
**************************


1. Introduction
===============
Do you recognise this ??
- I push Shift-P to start Pushback, press 1 or 2 for a Left c.q. Right
  turn, but the aircraft doesn't make the turn ....
- I want to see the Pushback from SpotPlane View mode ....
- I want to Pushback my aircraft from the gate onto the taxiway,
  but I don't know when to start the Left or Right Turn ....
- When my aircraft is taxiing, I can't control the speed properly ....
- Are my toebrakes working correctly, what's the applied brake pressure ? ...

This "groundhandling" addon addresses this, and adds some eye-candy too.

Functionality:
- A Pushback gauge (old-style version)
  o The Pushback sequence can be performed automatically, by setting the 
    time it should be pushed straight back, plus the desired turn angle.
  o It uses the standard FSX/P3D Pushback feature, so you can hear the 
    engine/environment sounds during Pushback and interworks with the
    scenery pushback trucks.
  o During Pushback, you can change the view.
  o To support Pushback operation, the cockpit-ground conversation is made
    audible.

- A Pushback gauge (free-control version)
  o Works like the old one, but doesnot use the standard Pushback feature,
    but a "speed-forcing" method instead. 
  o After pushback is started, you can freely steer the aircraft with rudder commands.

- A Taxispeed gauge:
  - Controls the groundspeed of the aircraft while taxiing, by setting a  
    desired taxispeed.
  - Has an ARM mode, so it can be activated automatically e.g. after landing
    or after a pushback.
  - Also works with all engines Off, simulation the aircraft being towed by a tow truck.

- A Brakes gauge:
  - Shows the position of the Parking Brakes, and lets you (de-)activate them by clicking.
  - Displays the brake pressure applied to the main brakes.
  - Makes the sound of brakes audible.


2. Installation
===============
1. Copy the contents of this V6 zipfile to your main .../gauges/ folder, so you have a new 
folder .../gauges/RCB_Groundhandling6/ , with all files in it.

2. For every aircraft you want to use it in:
Edit the file .../Panel/panel.cfg, and add the following Groundhandling 2D-window definitions:
- ** should be a unique number
- Use copy/paste to avoid typing errors.
- You can edit a .cfg file with Windows Notepad or any other pure text edittor. 

Under [Window Titles]
............
window**=GroundhandlingV6

and

[Window**]
size_mm=204,65
visible=0
window_size= 0.20,0.09
window_pos= 0.0,0.05
background_color=16,16,16
type=SPECIAL
gauge00=RCB_Groundhandling6!PushbackDisplay, 2,2,74,61
//gauge01=RCB_Groundhandling6!PushbackStatesStandard, 0,0                       //Using embedded FSX/P3D Pushback feature
gauge01=RCB_Groundhandling6!PushbackStatesFreeControl, 0,0                    //Using Pushback alternative
gauge02=RCB_Groundhandling6!Taxispeed, 79,2,64,61
//gauge03=RCB_Groundhandling6/AVM32!Maryadi_lv2av, 0, 0                         //For FSX and P3Dv2,3
gauge03=RCB_Groundhandling6/AVM64!Maryadi_lv2av, 0, 0                         //For P3Dv4 
gauge04=RCB_Groundhandling6!Brakes, 146,2,56,61
//gauge05=RCB_Groundhandling6/XMLSound32!Sound, 0,0,0,0, ./Gauges/RCB_Groundhandling6/XMLSound.ini  //For FSX and P3Dv2,3            
gauge05=RCB_Groundhandling6/XMLSound64!Sound, 0,0,0,0, ./Gauges/RCB_Groundhandling6/XMLSound.ini   //For P3Dv4             
gauge06=RCB_Groundhandling6!NoseWheelRadius, 0,0                         //Establishes the NoseWheelRadius of the aircraft


*** IMPORTANT ***
- The definition above is for P3Dv4 and uses the new free-control Pushback.
  But is prepared for use in FSX and old P3D versions.
  The difference is in the compiled ddl's: 32-bit versions for FSX/P3Dv2/3 and 
  64-bit for P3Dv4.
- To use the old-style Pushback: move the comment // in front of gauge01= to the other.
- To use GroundhandlingV6 in FSX-Accel/P3Dv2,3: move the comment // in front of gauge03=  AND gauge05= 
  to the other gauge03=  AND gauge05=  lines.

If Pushback doesn't seem to work and a red background appears after a few seconds,
with the message SOUND ERROR, this means that the conversation audio can't be played.
Meaning that the XMLsound gauge cannot find the XMLsound.ini file, or the .wav files in it.
Most probably cause:
- A typo in the panel.cfg definition.
- You have enabled the wrong XMLSound gauge version ! (32bit vs. 64bit)

If Taxispeed doesn't seem to work, probable causes are:
- The "Visual C++ 2015 Redistributable" isn't installed.
- You have enabled the wrong AVM gauge version ! (32bit vs. 64bit)


3. Gauge operation (see picture rcbgh-60.jpg)
==================
To set dials, you can also use the mouse scrollwheel instead of clicking.
You can open the Groundhandling window in any view, via menu Views - Instrument Panel.
When you change views, the window remains open.


3.1 Pushback operation (old-style pushback)
======================

3.1.1 Pushback timer/counters, buttons and phases
=================================================

The gauge has 4 clickable areas:
- A pushbutton, to activate Pushback.
  This button has an indicator light, giving the phase of pushback:
  oo RED: Pushback cannot be activated; make sure your Parking Brakes are set. 
  oo OFF: Click button to activate Pushback procedure.
  oo Flashing GREEN: Waiting for release of the Parking Brakes.
  oo GREEN: Pushing back.
  oo Flashing YELLOW: Pushback finished, set your Parking Brakes.
  oo YELLOW: Pushback procedure terminating.

- A Turn selector.
  Toggles between pushing straight back, or left/right turn (after the set 
  straightback time). When Left or Right turn is selected, the Turn
  counter is pre-set to 90 degrees.
  Only visible when Pushback is allowed.

- A StraightBack timer.
  This is the time the aircraft will move straight back, before it starts to turn.
  It is preset to a minimum value, depending on the size of the aircraft, so 
  you can only set the time to higher then the default.
  When Pushback is started, the timer counts down; and when zero:
  oo If you have set an angle: the aircraft starts the pushback turn, and stops when the set angle reached.
  oo If no angle is set (straight pushback): stops without turn.
  Click to increment the value.
  Only visible when Pushback is allowed.

- A Turn Counter.
  This counter (0 - 90 degrees, the left two digits) determines the angle of
  the turn that you want the aircraft to make.
  Click to increment or decrement the value.
  Only visible when the Turn Selector is set to Left/Right turn.

A few notes: 
1. "Turning Left" means: the aircraft turns clockwise in TopView c.q. the
   heading increases while turning. As the standard FS pushback does.
2. When Pushback is active (GREEN light), you cannot change the Timer/Counter
   values anymore.
3. When Pushback is active (GREEN light), you can terminate the Pushback
   at anytime by clicking the Pushback switch again.
4. After setting up the Timer/Counters, and activating the Pushback by clicking
   the button, you can change the view mode at any time.
5. You can use Pushback either with Engines off, or with engines running.
   So you can start your engines during Pushback operation.
6. During the entire pushback procedure, the throttles forced to Idle position.


About the FSX/P3D Pushback trucks:
Whether a pushback truck shows up for pushback, depends on the following:
- The setting of the AirportVehicleDensity slider in menu Options - Settings - 
  Display, tab Traffic.
- The spot where your aircraft is parked.
  Obviously, these spots are defined in the scenery, and your aircraft
  has to be properly parked at a gate (with a pushback truck visible in front of you).
The pushback gauge will work with or without a truck visible; but if a truck IS
used, the gauge detects it and the truck movement/release is synchronised with
the pushback procedure/conversation !!


3.1.2 Pushback Operation and Ground-Cockpit conversation
========================================================
- Set the Parking Brakes.
  The RED light goes off.
- Set the Straightback timer: the number of seconds before a turn.
- Select the Turn type: None, Left or Right.
- If Left/Right, adjust the turnangle if needed,
- Activate the Pushback procedure by clicking the Pushback button.
  The GREEN light starts flashing and the pushback truck is called.

When the pushback truck (if present) has arrived:

Cockpit: "Ground from cockpit"
Ground:  "Go ahead"
Cockpit: "Ready for pushback"
Ground:  "OK. Steering pin inserted, release brakes"

- The gauge now waits untill you release the Parking Brakes; a ticker sound is
  played in the mean time, to indicate that the gauge awaits a Parking Brakes
  operation.

Cockpit: "Brakes are released"
Ground (if engine1 is running): "OK. Pushing back"
Ground (if engine1 NOT running: "OK. Pushing back. All engines cleared for
                                 startup"

The following Pushback sequence is performed:
- The light goes solid GREEN. 
- The StraightBack Timer counts down to 0 while the aircraft is pushed straight back.
- If the LeftTurn or RightTurn Counter was set, the aircraft starts to turn.
  During the turn the Counter indicates the remaining turn angle, and therefore
  counts down to 0.
While a pushback is Active, an aircraft "rolling" sound is played; this sound
is especially noticeable when the engines are off during the pushback.

Ground: "Set parking brakes"

- The AMBER light start flashing.
  The gauge waits untill you set the Parking Brakes; a ticker sound is played.

- The light goes solid AMBER.

Cockpit: "Parking brakes are set. Prepare aircraft for taxi and give 
          handsignal on left side"
Ground:  "OK"

The pushback truck (if present) now moves away from the aircraft.
After a few seconds:

Ground: "Towing system removed. Wait for handsignal on left-hand side"

- Now the pushback is finished, and the indicator light goes off.


3.2 Pushback operation (free-control)
======================
Works the same way (including all the sound interaction), but is based on the same
speed-control method I now use in Taxispeed.
-  You can freely control the pushback heading yourself, continously, with rudder input.
   Like you are steering the Pushback truck.
-  Obviously, there's no turn angle or time dial visible.
   To stop an active Pushback, just apply Parking Brakes.
   They will immediately be auto-released again, but will force Pushback to the next
   phase (decellerate and stop)
-  Since this doent use the FSX/P3D Pushback function anymore, theres no visual interaction
   with pushback trucks in the scenery !!!


3.3 Taxispeed operation.
========================

3.3.1 Taxispeed indicators and dials
====================================
The gauge consists of 3 clickable areas:
- A pushbutton, to activate/deactivate the gauge.
  This button has an indicator light, colored as follows:
  - OFF: Click button to arm the gauge.
  - FLASHING GREEN: Taxispeed control is Armed.
  - GREEN: Taxispeed control is Active.
- The Target Taxispeed (the Left two digits). Default: 15 knots.
  You can change the target speed at any time, even if Taxispeed is Active:
  oo Click the dial to increment or decrement the value between 2 and 40 Knots.
  oo Alternatively, you can incr/decr. the target speed with keys/buttons:
     ooo Decrease: giving the event Select_3 (default key: 3, on the main keyboard part).
     ooo Increase: giving the event Select_4 (default key: 4, on the main keyboard part).
     HOWEVER: this only works if the GH window is visible and has "focus"; meaning, that
     if you have a (transparent) window visible (like ATC) this method doesn't work !! 
- The Actual Groundspeed (the Right two digits).


3.3.2.How the Taxispeed control works
=====================================
When Off, and clicked, the gauge becomes Armed.
When Armed or Active, and clicked, the gauge goes Off again.

When Armed, the gauge will become Active when if ALL the following conditions
are met:
- The aircraft is on the ground.
- The ParkingBrakes are released.
- Pushback is inactive.
- Groundspeed is less than 50 knots.
  If this is the last condition to become true (when e.g. Taxispeed is Armed
  before landing), the gauge also sets:
  oo Spoilers/Airbrakes Off.
  oo Autobrakes Off.
  oo Flaps to Retracted.

When Active, the Taxispeed gauge controls the groundspeed of the aircraft while
taxiing, by calculating/overwriting FS speed variables via SimConnect.
And sets throttles (of running engines) accordingly.
- The target taxispeed can be adjusted from 2 - 40 knots.
- The gauge deactivates when:
  oo Parking Brakes are set; the ParkingBrakes are immediately released again,
     so the aircraft reduces speed to 0 the normal way.
  oo The throttles are manually set to > 60% (usually to start takeoff).
  oo When Brakes are applied by the user, the gauge temporarily releases control
     untill they are released again.



3.4 The Brakes gauge
========================
This gauge does the following:
- A lighted pushbutton switch that shows the position of the Parking Brakes, 
  which is colored as follows:
  - Off:   Parking Brakes are released. Click to set.
  - GREEN: Parking Brakes are set. Click to release.

- It displays the braking pressure (0 - 100 %) you apply with the
  Left/Right brakes, indicated by two green bars. Note that when the Parking
  Brakes are set, both bars always indicate max. pressure.

- It triggers a brakes sound when the aircraft is on the ground, the brake 
  pressure is > 20% and groundspeed is > 5 knots.


4. Copyrights and Disclaimer
============================
This gaugeset is freeware, NOT Public Domain; and available for your personal use.
Without my explicite permission, it may NOT be sold, re-distributed and/or 
uploaded to another website (in ANY shape or form).

If you want to bundle (part of) this gaugeset with your (freeware) panel, 
you may ONLY do so AFTER my explicite permission and inclusion of this
README file as-is.

And obviously, installing & using this gauges is at your own risk !!


5. Credits
==========
- Doug Dawson, for his great XMLsound gauge, used to play all conversations.
- Maryadi, for his AVM gauge, that enables me to overwrite speed variables in
  the sim (via SimConnect) from XML code.
- Jim Hamilton, for beta-testing this package in P3Dv4.


6. Closure
==========
I hope you enjoy using these gauges; I know many people did with the previous
versions. And I'm always open to questions, or suggestions for improvement (no
guarantee that I will make them though).
But PLEASE, before asking me questions or report "bugs", make sure that
the answer can't be found in this README file.

Enjoy .....

Rob Barendregt, The Netherlands
Email: rc.barendregt@planet.nl

               **************************************



Appendix-1: Used sounds
=======================
The following soundfiles are being used in this package:
- GH01_Conversation1:  "Ground from cockpit ... release brakes"
- GH02_Conversation2:  "Brakes are released. OK pushing back"
- GH03_Conversation3:  "Set Parking Brakes"
- GH04_Conversation4A: "Parking Brakes are set, prepare aircraft ...... OK"
- GH09_Conversation4B:  Towing system removed. Wait for handsignal on left-hand side"
- GH05_Conversation5:  "Brakes are released. OK pushing back. All engines ...."
- GH06_SoftClick:      Click sound, when a pushbutton is clicked.
- GH07_Error:          Procedure error, when clicking a button/dial at the wrong moment.
- GH08_PushbackRoll:   Groundroll sound during Pushback.
- GH10_Attention:      Attention sound, when Pushback awaits ParkingBrakes action.
- GH11_Brakes:         Brakes sound.

It's possible to replace this sound set with your own conversation sounds.
(the timing is not time-critical).
You can use different file names for the .wav files; if you do, you only
need to edit the XMLSound.ini file, using the replacement filenames.

If you find the pushback conversation sounds too loud, you can change
them yourself in the XMLsound.ini file; individually per sound.
Just open the XMLSound.ini file with Notepad, search for the GH_****.wav
file, and edit the volume number in that line:
o 0, or no value, is the max. (default) volume.
o -3000 makes the sound almost inaudible.
o -10000 sets the volume off.

Note that the sound volume of sounds played by XMLSound, is independant of
the overall sound volume you set in FSX/P3D.
Meaning that if the GH-sounds are not loud enough, you have to lower the
aircraft/environment sound volumes in the FSX/P3D menu.


Appendix-2: When you are using Groundhandling V5.....(rcbgh-50.zip)
===================================================
- Use the new [Window**] definitions in the panel.cfg
  V6 doesn't use any of the installed files of V5, so you may remove
  the old files (or not; they won't do any harm).

- Main changes in Pushback (old-style):
  oo StraightBackDistance (in meters) now is StraightBackTime (in sec).
     When the timer reaches zero, the aircraft starts the pushback turn (if set).
  oo Visibility of the direction arrow, time dial and turn angle dial.
     These field are only visible (and changeable) when the Pushback function can be activated. (ie: not a RED indicator).
  oo Only the trottles of running engines are forced to Idle during Pushback.
     You only hear ..."All engines cleared for startup" if at least one engine isn't running.

- Main changes in Taxispeed:
  oo A new speed-forcing algoritm is used; much more exact, and works for any aircraft.
     Even on moving surfaces, like an aircraft carrier.
  oo Globally the same working, except:
     ooo Only the trottles of running engines are manipulated by the gauge (so you can taxi on any or all engines)
     ooo When Taxispeed is Active (steady Green light), applying Parking Brakes will disable Taxispeed.
         Or, just click the gauge again.
     ooo If all engines are Off, Taxispeed still works, now simulating a tow-truck !



**************************** End Of Document **********************************
